package com.xwj.Handler;

import com.xwj.service.redis.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RedisCacheContextClosedHandler {

    @Autowired
    private RedisService redisService;

    public void clearAllCache() {
        redisService.removePattern("*");
    }
}
